package com.ddwl.schema.bo.goods;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Author hemiaojun
 * @Date 2021/7/1 16:46
 */
@ApiModel("商品评价bo")
@Getter
@Setter
public class ItemRateBo {

    /**
     * id
     */
    @ApiModelProperty(value="id",hidden = true)
    private String id;

    /**
     * 店铺id
     */
    @ApiModelProperty(value="店铺id",hidden = true)
    private String shopId;

    /**
     * 商品id
     */
    @NotEmpty(message = "商品id不能为空")
    @ApiModelProperty(value="商品id")
    private String itemId;

    /**
     * 用户id
     */
    @ApiModelProperty(value="用户id",hidden = true)
    private String userId;

    /**
     * 订单id
     */
    @ApiModelProperty(value="订单id",hidden = true)
    private String orderId;

    /**
     * 商品规格code
     */
    @NotEmpty(message = "商品规格code不能为空")
    @ApiModelProperty(value="商品规格code")
    private String skuCode;

    /**
     * 用户昵称
     */
    @ApiModelProperty(value="用户昵称",hidden = true)
    private String nickname;

    /**
     * 规格描述
     */
    @ApiModelProperty(value="规格描述")
    private String itemSpecs;

    /**
     * 评论内容
     */
    @ApiModelProperty(value="评论内容")
    private String content;

    /**
     * 评分
     */
    @NotNull(message = "评分不能为空")
    @ApiModelProperty(value="评分")
    private Integer score;

    @Valid
    @Size(max = 5,message = "最多只能上传5张图片(包括视频)")
    @ApiModelProperty(value = "评论图片列表")
    private List<ItemRateMediaBo> itemRateMediaBoList;

}
